import java.util.ArrayList;

public class ArrayOps
{
   /**
       This method goes through the array of integers identified by
       the only parameter, creating a new ArrayList from the array,
       eliminating duplicates from the original array.
       @param theArray, an array of integer
       @return the new ArrayList

   */
   public static ArrayList copyArray(int[] anArray)
   {
      // your work here

      // declare the new ArrayList

      // loop through anArray, eliminating duplicates,
      // storing each unique element in the ArrayList

      // your work here

      // return new ArrayList

      // your work here
      ArrayList array = new ArrayList<>();
      for(int i=0;i<anArray.length;i++){
         if(!array.contains(anArray[i])){
            array.add(anArray[i]);
         }
      }
      return array;
   }
}